To Inline or Not to Inline? Enhanced Inlining Decisions

نویسندگان

  • Peng Zhao
  • José Nelson Amaral
چکیده

The decision to inline a procedure in the Open Research Compiler (ORC) was based on a temperature heuristics that takes into consideration the time spent in a procedure and the size of the procedure. In this paper we describe the trade-off that has to be worked out to make the correct inlining decisions. We introduce two new heuristics to enhance the ORC inlining heuristics: adaptation and cycle density. With adaptation we are allowed to vary the temperature threshold and prevent penalizing small benchmarks. With cycle density we prevent the inlining of procedures that have a high temperature in spite of being called infrequently. Experiments show that while adaptation improves the speedup obtained with inlining across the SPEC2000 suite, cycle density reduces significantly both the code growth and compilation time increase caused by inlining. We then characterize the SPEC INT2000 benchmarks according to the inlining potential of their function calls. Our enhancement is released in the ORC 2.0.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Flow - directed

A ow-directed inlining strategy uses information derived from control-ow analysis to specialize and inline procedures for functional and object-oriented languages. Since it uses control-ow analysis to identify candidate call sites, ow-directed inlining can inline procedures whose relationships to their call sites are not apparent. For instance, procedures deened in other modules, passed as argu...

متن کامل

A Study and Analysis of Function Inlining

Function inlining is a widely known technique which has been used to improve program performance. Inlining replaces a function call by the body of the function. In this report, we study the eeects of inline function expansion by observing the empirical behavior of a set of C and C++ programs. Our results indicate that for the average C program improvements in timings due to inlining are not muc...

متن کامل

An Experiment with Inline Substitution

This paper describes an experiment undertaken to evaluate the effectiveness of inline substitution as a method of improving the running time of compiled code. Our particular interests are in the interaction between inline substitution and aggressive code optimization. To understand this relationship, we used commercially available FORTRAN optimizing compilers as the basis for our study. This pa...

متن کامل

Partial Inlining

Technical Summary 1 Motivation Subprogram inlining is an optimization that has been studied extensively in the By replacing a procedure call with a copy of the body of the called procedure, it ooers a number of beneets: the overhead associated with the procedure call is eliminated; the inlined code can be optimized for the particular call site that was expanded; and the caller's code can potent...

متن کامل

Next In Line, Please!

Inlining is an important optimization that can lead to significant runtime improvements. When deciding whether or not to inline a method call, a virtual machine has to weigh an increase in compile time against the expected decrease in program time. To estimate the latter, however, state-of-the-art heuristics only use information local to the call-site in question. But inlining is a powerful ena...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003